package com.hg.library.ui.textview;

import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.SoundEffectConstants;
import android.widget.TextView;

import com.hg.library.graph.Fonts;

/**
 * Created by ASUS-PC on 2016/4/20.
 */
public class LanTingHeiText extends TextView{

    public LanTingHeiText(Context context) {
        super(context);
        setTypeface(Fonts.getFont(Fonts.LAN_TING_HEI));
    }

    public LanTingHeiText(Context context, AttributeSet attrs) {
        super(context, attrs);
        setTypeface(Fonts.getFont(Fonts.LAN_TING_HEI));
    }

    @Override
    public boolean requestFocus(int direction, Rect previouslyFocusedRect) {
        playSoundEffect(SoundEffectConstants.CLICK);
        return super.requestFocus(direction, previouslyFocusedRect);
    }
}
